//
//  ViewController.m
//  CusWebView
//
//  Created by yeqiang on 2024/2/18.
//

#import "ViewController.h"
#import "YQJSBridgeWebViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = UIColor.whiteColor;
    
    UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
    [btn setTitle:@"点击" forState:UIControlStateNormal];
    [btn setTitleColor:UIColor.blackColor forState:UIControlStateNormal];
    [btn addTarget:self action:@selector(helloworld) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn];
}

- (void)helloworld {
    NSURL *url = [[NSBundle mainBundle] URLForResource:@"aaa" withExtension:@"html"];
    YQJSBridgeWebViewController *vc = [[YQJSBridgeWebViewController alloc] initWithURL:url];
    vc.modalPresentationStyle = UIModalPresentationFullScreen;
    [self presentViewController:vc
                       animated:YES completion:nil];
    
}


@end
